# Maintainer: Alexey Pavlov <alexpux@gmail.com>

_realname=IPC-Run3
pkgname=perl-${_realname}
pkgver=0.048
pkgrel=1
pkgdesc="run a subprocess with input/ouput redirection"
arch=('any')
url="http://github.com/rjbs/ipc-run3/"
groups=('perl-modules')
depends=('perl')
license=('PerlArtistic' 'GPL')
options=('!emptydirs')
source=("http://search.cpan.org/CPAN/authors/id/R/RJ/RJBS/${_realname}-${pkgver}.tar.gz"
        'IPC-Run3-0.045.patch')
sha1sums=('b035ea6e0a89f309d88a0472ab0e531f6e8626b1'
          '9209a47759d99ba1b7405794f46790d0ab0e1fee')

prepare() {
  cd "${srcdir}/${_realname}-${pkgver}"
  patch -p1 -i ${srcdir}/IPC-Run3-0.045.patch
}

build() {
  cd "${srcdir}/${_realname}-${pkgver}"
  perl Makefile.PL INSTALLDIRS=vendor
  make
}

check() {
  cd "${srcdir}/${_realname}-${pkgver}"
  make test
}

package() {
  cd "${srcdir}/${_realname}-${pkgver}"
  make DESTDIR="$pkgdir" install
}
